{include file=$header_start}
{strip}
<script src="{$siteroot}/includes/js/admin/city.js" type="text/javascript"></script>
<script src="{$siteroot}/includes/js/admin/ajax.js" type="text/javascript" ></script>
{/strip}
{include file=$header_end}
</script>
{literal}
<script type="text/javascript">
// This function is fetch state by country id
function showState(cid){
	ajax.sendrequest("GET",SITEROOT + "/admin/city/show_state.php",{cid:cid},"","isShowState");
}
</script>
{/literal}
 <div class="contain">
 
      {include file=$left_menu}
      
      <div class="right_contain">
        
         <div class="heading_box">Add City</div>
         <div class="whitebox">
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
           {$msg}
         </div>
         {/if}
         <!--Message Div End-->
         
         <form name="frmAddCity" id="frmAddCity" action="" method="post">
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox">
           	<!--<dl>
              <dt>Select Country:<span class="error">*</span></dt>
              <dd><select class="select" name="country_id" id="country_id" onchange="showState(this.value);">
              <option value="">Select Country</option>
            /*  {section name=i loop=$countryArray}
               <option value="{$countryArray[i].country_id}" {if $countryArray[i].country_id eq $smarty.post.country_id} selected="selected" {/if}>{$countryArray[i].country_name}</option>
               {/section}*/
              </select>
			  </dd>
              <div class="clear"></div>
             </dl>-->
             
            <dl>
              <dt>Select State:<span class="error">*</span></dt>
              <dd id="isShowState"><select class="select" name="state_id" id="state_id">
              <option value="">Select State</option>
              {section name=i loop=$stateArray}
               <option value="{$stateArray[i].state_id}" {if $stateArray[i].state_id eq $cityArr.state_id} selected="selected" {/if}>{$stateArray[i].state_name}</option>
               {/section}
              </select>
              </dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>City Name:<span class="error">*</span></dt>
              <dd><input type="text" class="input" name="cityname" id="cityname" value="{$smarty.post.cityname}" maxlength="20" /></dd>
              <div class="clear"></div>
             </dl>

              <dt>&nbsp;</dt>
            
              <div class="clear"></div>
             </dl>
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="addcity_btn" id="addcity_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel" onclick="window.location='{$siteroot}/admin/home.php?q=city&page={$smarty.get.page}';"/></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
{include file=$footer}